import React from 'react'
import ReactDOM from 'react-dom'

function NumberList(props) {
  const numbers = props.list
  return (
    <div>
      {numbers.map(number =>
        <h3 key={number.id}>{number.name}</h3>)
      }
    </div>
  )
}

const list = [
  {id: 1, name: 'tom', age: 22, sex: 'man'},
  {id: 2, name: 'jerry', age: 18, sex: 'girl'},
]

ReactDOM.render(
  <NumberList list={ list }/>,
  document.getElementById('root')
)